import request from '@/utils/request'
// 查询所有部门信息
export function getDepartments() {
  return request({
    method: 'get',
    url: '/company/department'
  })
}
// 删除部门
export function delDepartment(id) {
  return request({
    method: 'DELETE',
    url: '/company/department/' + id
  })
}
// 新增部门
export function addDepartment(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}
// 获取员工简单列表
export function getDepartmentUser() {
  return request({
    method: 'get',
    url: '/sys/user/simple'
  })
}
// 获取部门详情
export function getDepartmentDetail(id) {
  return request({
    method: 'get',
    url: '/company/department/' + id
  })
}
// 修改部门详情
export function changeDepartment(id, data) {
  return request({
    method: 'put',
    url: '/company/department/' + id,
    data
  })
}

